package io.github.heollhai.common.config.exceptions;

import io.github.heollhai.common.result.ResultCode;
import io.github.heollhai.common.result.ResultCodeEnum;

/**
 * ClassName: GraceException
 * Package: com.mf.exceptions
 * Description:优雅的处理异常，统一封装
 *
 * @Author: lmf
 * @Create: 2024/5/27 15:56
 */

public class GraceException {

    public static <R extends Enum<R> & ResultCode> void display(R resultCodeEnum) {
        throw new MyCustomException(resultCodeEnum);
    }

    public static void display(String errorMessage) {
        throw new MyCustomMsgException(errorMessage);
    }
}
